package com.pwt.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import lombok.EqualsAndHashCode;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import java.util.ArrayList;
import java.util.List;


/**
 * 产品属性
 *
 * @author auto generated
 * @date 2021-08-31 12:03:28
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "[product_attribute]")
@Schema(name = "产品属性")
@DynamicInsert
@DynamicUpdate
public class ProductAttribute extends BaseEntity {

	/**
	 * 属性名称
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "type",description = "属性类型，1-Control alarm，2-Tolerance alarm，3-SCRAP")
	@Column(name = "type", nullable = true, length = 64)
	@NotNull(message = "名称不能为空！")
	private Integer type;

	/**
	 * 颜色 十六进制
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "color",description = "颜色 十六进制")
	@Column(name = "color", nullable = true, length = 64)
	private String color;

}
